home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume8 / libhoward / part01 next >
Encoding:
Text File  |  1989-10-28  |  45.5 KB  |  1,213 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v08i096: libhoward portability library, part 1 of 9 (repost)
  3. from: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  4. Reply-To: howard@dahlbeck.ericsson.se (Howard Gayle)
  5.  
  6. Posting-number: Volume 8, Issue 96
  7. Submitted-by: howard@dahlbeck.ericsson.se (Howard Gayle)
  8. Archive-name: libhoward/part01R
  9.  
  10. #! /bin/sh
  11. # This is a shell archive.  Remove anything before this line, then feed it
  12. # into a shell via "sh file" or similar.  To overwrite existing files,
  13. # type "sh file -c".
  14. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  15. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  16. # If this archive is complete, you will see the following message at the end:
  17. #        "End of archive 1 (of 9)."
  18. # Contents:  README freezePch0.b hetero.tex
  19. # Wrapped by howard@hasse on Mon Sep 25 07:08:04 1989
  20. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  21. if test -f 'README' -a "${1}" != "-c" ; then 
  22.   echo shar: Will not clobber existing file \"'README'\"
  23. else
  24. echo shar: Extracting \"'README'\" \(10030 characters\)
  25. sed "s/^X//" >'README' <<'END_OF_FILE'
  26. X$Header: README,v 1.3 89/09/23 15:25:11 howard Exp $
  27. X
  28. X      DESCRIPTION
  29. X
  30. XThis is my C function library, collection of C include files,
  31. Xcollection of TeX and LaTeX include files, and set of useful
  32. Xlittle shell files.  I use it in essentially all my software.
  33. XThe C library includes macros and functions for portability,
  34. Xwriting error messages, safely converting numbers to internal
  35. Xrepresentations, safely reading lines of text, performing
  36. Xvarious common functions with full error checking, some string
  37. Xfunctions, etc.  There are shell files for supporting my scheme
  38. Xfor software sharing in a network of heterogeneous UNIX hosts.
  39. XThis is described in a LaTeX report.
  40. X
  41. X
  42. X      RATIONALE
  43. X
  44. XMany people make each software system they release stand-alone,
  45. Xby duplicating code for common C functions.  I decided instead
  46. Xto put the C functions I use over and over into a library, for
  47. Xthese reasons:
  48. X   1) In a library it is easier for others to use them.  They
  49. X      are all documented.
  50. X   2) Net bandwidth is saved by posting them only once.
  51. X   3) Now that some UNIXes support shared libraries (e.g. SunOS
  52. X      4.x), I want to use them.  Shared libraries reduce the
  53. X      sizes of executable files, and they make it possible to
  54. X      fix bugs in library functions without recompiling all
  55. X      programs that use them.
  56. X
  57. X
  58. X      PREREQUISITES
  59. X
  60. XANSI-C float.h and limits.h include files must be on the C
  61. Xinclude file search path.  If you don't have them, you can use
  62. XSteven Pemberton's config program to make one.  It was posted to
  63. Xcomp.sources.misc on 30 April 1989 as volume 6 issue 96, archive
  64. Xname config2.
  65. X
  66. XThe makefiles use features that may only be in GNU make, version
  67. X3.54 or later.
  68. X
  69. XChris Tweed's sets command must be on the command search path.
  70. XIt was posted to comp.sources.unix on 24 February 1988 as volume
  71. X13, issue 68, archive name sets.
  72. X
  73. XSome of the documentation is in LaTeX.
  74. X
  75. XThe Bourne shell scripts use if [...] syntax instead of explicit
  76. Xcalls to test.  You might need to link test to [ to make this
  77. Xwork.
  78. X
  79. X
  80. X      INSTALLATION
  81. X
  82. XIt will be much easier to understand the installation if you
  83. Xfirst read my report.  It is in the LaTeX source file
  84. Xhetero.tex.  If you have LaTeX installed, you can format it like
  85. Xthis.
  86. X   % latex hetero
  87. X   % bibtex hetero
  88. X   % latex hetero
  89. X   % latex hetero
  90. X   (print hetero.dvi)
  91. X
  92. XFigure out where you want to install various files.  Here I'll
  93. Xassume a separate directory for everything, but it's easy to
  94. Xmake a different choice.  I discuss an alternative example
  95. Xbelow.
  96. X
  97. XCreate a directory for compiling on this machine type.  I'll
  98. Xcall it /usr/local/free/howard.
  99. X
  100. XFind out the version.  Look at the Header line (typically the
  101. Xfirst line) of the FREEZE file.  The version is the first
  102. Xnumber, and ends at the period.
  103. X
  104. XCreate a subdirectory for this version. e.g.
  105. X/usr/local/free/howard/1.
  106. X
  107. XCreate the following subdirectories for results:
  108. X   bin             Installed Bourne shell scripts.
  109. X   include/howard  Installed include files.
  110. X   man/man1        Manual entries.
  111. X   man/man3
  112. X   man/cat1        On-line formatted manual entries,
  113. X   man/cat3        for systems with e.g. catman.
  114. X   tex             Installed TeX & LaTeX macro files.
  115. X
  116. XFor example:
  117. X   % cd /usr/local/free/howard/1
  118. X   % mkdir bin include include/howard man man/{cat,man}{1,3} tex
  119. X   
  120. XCreate a subdirectory for doing the actual compilations.  I'll
  121. Xcall it sun34:
  122. X   % mkdir sun34
  123. X
  124. XBootstrap the Bourne shell scripts into their installation
  125. Xdirectory.  Let $DD be where the master source is:
  126. X   % cp $DD/*.b bin
  127. X   % cd bin
  128. X   % /bin/ls -1 | sed -e 's;\.b$;;' | xargs -i= -t mv =.b =
  129. X   % chmod +x *
  130. X   % cd ..
  131. X   
  132. XIf you want to override the behavior of any of the Bourne shell
  133. Xscripts for portability or because of different local policies,
  134. Xthis is a good time to do so.  I suggest putting locally changed
  135. Xcopies in a separate bin directory that is on the command search
  136. Xpath *before* the bin directory in which the scripts will be
  137. Xinstalled, e.g. create /usr/local/free/howard/1/local-bin, and
  138. Xput it on the command search path before
  139. X/usr/local/free/howard/1/bin.  Here is a guide to possible local
  140. Xchanges:
  141. X
  142. X   mkAr  This makes the ar archive library.  It is very BSDish
  143. X         and must change for the `lorder $* | tsort` crowd.
  144. X
  145. X   mkCIncl    These both assume that calling /lib/cpp -M is the
  146. X   mkLibIncl  way to find out what include files a C source
  147. X              file uses.  Change them if that's wrong for your
  148. X              system.
  149. X
  150. X   mkDistI  This is how files get from the master source
  151. X            directory to the compilation directory.  I use
  152. X            symbolic links.
  153. X
  154. X   mkInstF  This is how non-executable files get installed.  I
  155. X            use hard links.  Shell scripts count as
  156. X            non-executable.
  157. X
  158. X   mkInstX  This is how executable files get installed.  I
  159. X            use hard links.  This would be the place to strip
  160. X            symbol tables.  Shell scripts are *not* considered
  161. X            to be executable.
  162. X
  163. X   mkLaTeXPS  This formats a LaTeX file, including BibTeX
  164. X              processing, all the way to a printable
  165. X              representation, which for me is PostScript.  If
  166. X              you want some other final format, I would suggest
  167. X              writing a separate shell script.
  168. X            
  169. X   mkManPS  This formats a manual entry to PostScript, using
  170. X            TransScript.  If you have some other way to format
  171. X            manual entries, I would suggest writing a separate
  172. X            shell script.
  173. X
  174. XIf you write original software with these tools, you may also
  175. Xwant to change mkDistO, which places files in the distribution
  176. Xdirectory.  I use hard links for this.  Also, the following are
  177. Xwritten for use with RCS, and would have to be changed for use
  178. Xwith SCCS: cia, freeze, freeze0, freezePch, freezePch0,
  179. XmkFreeze, mkUncmprs.
  180. X
  181. XSet up the command search path to pick up the Bourne shell
  182. Xscripts.  Rehash if necessary.
  183. X
  184. XChange directory into the actual compilation directory, e.g.  cd
  185. Xsun34.
  186. X
  187. XCreate an mk shell file.  Make it executable.  Here's a starting
  188. Xpoint for SunOS 4.x:
  189. X
  190. XDD=/usr/local/free-dist/howard/1/dist
  191. XSRCS=`cd $DD; echo *`
  192. XRM='rm -f'
  193. Xexport DD SRCS RM
  194. Xmake -f uMakefile
  195. Xexec make \
  196. X   CATMAN=catman \
  197. X   FMTLATEX=mkLaTeXPS \
  198. X   FMTMAN=mkManPS \
  199. X   SLT=libhoward.so.`cat FREEZE.version` \
  200. X   $*
  201. X
  202. X
  203. XIf you don't have a catman command, drop that line.  FMTLATEX
  204. Xshould be the name of a command to turn LaTeX source into
  205. Xwhatever your printer prints; if you don't have one just drop
  206. Xit.  Likewise, FMTMAN should be the name of a command to turn
  207. Xmanual entries into printable form.  If you don't have shared
  208. Xlibraries, drop the SLT= line.  Add any local changes you need
  209. Xhere.  If your C compiler doesn't understand different
  210. Xoptimization levels, add CFLAGS=-O as an argument to the last
  211. Xmake.
  212. X
  213. XHere is an alternate mk file for a system using GCC, and with
  214. Xresults installed in more conventional places:
  215. X
  216. XDD=/usr/local/free-dist/howard/1/dist
  217. XSRCS=`cd $DD; echo *`
  218. XCC=gcc
  219. XCFLAGS='-g -O -traditional'
  220. XINCLUDES=-I/usr/local/include
  221. XRM='rm -f'
  222. Xexport DD SRCS CC CFLAGS INCLUDES RM
  223. Xmake -f uMakefile
  224. Xexec make \
  225. X   AID=/usr/local/lib \
  226. X   BID=/usr/local/bin \
  227. X   CATMAN=catman \
  228. X   HID=/usr/local/include/howard \
  229. X   LIBPATH='-L/usr/local/lib' \
  230. X   LNID=/usr/local/lib/lint \
  231. X   MID=/usr/local/man \
  232. X   TESTCFLAGS='-g' \
  233. X   TEXID=/usr/local/tex \
  234. X   $*
  235. X
  236. XBe sure that the parent directory of the directory in which the
  237. Xinclude files are installed (HID) is on the include file search
  238. Xpath (INCLUDES).
  239. X
  240. XGet MakeCommon and uMakefile from the master source directory,
  241. Xe.g.
  242. X   % mkDistI MakeCommon $DD
  243. X   % mkDistI uMakefile  $DD
  244. X
  245. XRun
  246. X   % mk vars
  247. XThis will produce a huge number of error messages about missing
  248. Xinclude files.  Just ignore them.  It may also produce C
  249. Xcompiler error messages when mk-cc-lims runs.  Ignore them too:
  250. Xmk-cc-lims is just trying to figure out what your C compiler can
  251. Xand can't do.  It will also echo the values of a bunch of make
  252. Xvariables.  That's normal.
  253. X
  254. XCheck out all the generated include files (*.i).  Make sure they
  255. Xlook reasonable.
  256. X
  257. XInstall the include files:
  258. X   % mk install-include
  259. X
  260. XNow, give mk a chance to build the depend file correctly:
  261. X   % rm -f depend
  262. X   % mk
  263. XThis should make everything.  There should *not* be any error
  264. Xmessages about missing include files.
  265. X
  266. XYou can do some testing now if you like.  Each C function comes
  267. Xwith a built-in test driver.  For example, you can test a2ul()
  268. Xlike this:
  269. X   % mk a2ul-t
  270. X   % a2ul-t 10
  271. XRunning "mk test" will compile all the test drivers.  A few of
  272. Xthe test drivers even do marginally useful things.
  273. X
  274. XRun "mk install" and you're finished.
  275. X
  276. X
  277. X      ANOMALIES
  278. X
  279. XGNU make is still (at version 3.54) somewhat buggy.  It does not
  280. Xalways pick up environment variables, so it is sometimes
  281. Xnecessary to rewrite mk to pass them as command line arguments
  282. Xinstead.  Run "mk vars" to check that everything is all right.
  283. X
  284. XGNU make also pollutes the environment with all make variables.
  285. XThis can be too much for some of the commands it runs.  One way
  286. Xaround this is to replace command foo by "env - foo".  I needed
  287. Xto do this for ranlib in SunOS 4.0.1.  It was OK in 4.0.3.
  288. XAlso, the Bourne shell sometimes seems to suffer from an excess
  289. Xof environment variables.  Using the C shell instead is a
  290. Xpossible workaround, e.g. pass SHELL=/usr/bin/csh on the command
  291. Xline.  (IMHO, GNU make needs some way to indicate which
  292. Xvariables should and should not be exported, e.g. something like
  293. X"export" in the Bourne shell.)
  294. X
  295. XThe documentation for atof(3) says errno is set to ERANGE on
  296. Xoverflow and underflow.  In SunOS 4.0.1, and perhaps other
  297. Xsystems, errno is also sometimes set even without overflow, e.g.
  298. Xon an input of 0.  As a workaround, pass DEFS=-DBADATOF to the
  299. Xlast make in mk.  This skips the check of errno.  Unfortunately,
  300. Xthis means overflow is *never* detected.  This bug *seems* to
  301. Xhave been fixed in SunOS 4.0.3.
  302. X--
  303. XHoward Gayle
  304. XTN/ETX/T/BG
  305. XEricsson Telecom AB
  306. XS-126 25 Stockholm
  307. XSweden
  308. Xhoward@ericsson.se
  309. Xuunet!ericsson.se!howard
  310. XPhone: +46 8 719 5565
  311. XFAX  : +46 8 719 9598
  312. END_OF_FILE
  313. if test 10030 -ne `wc -c <'README'`; then
  314.     echo shar: \"'README'\" unpacked with wrong size!
  315. fi
  316. # end of 'README'
  317. fi
  318. if test -f 'freezePch0.b' -a "${1}" != "-c" ; then 
  319.   echo shar: Will not clobber existing file \"'freezePch0.b'\"
  320. else
  321. echo shar: Extracting \"'freezePch0.b'\" \(1076 characters\)
  322. sed "s/^X//" >'freezePch0.b' <<'END_OF_FILE'
  323. X  
  324. X# freezePch0.b - auxiliary shell script for freezePch
  325. X#
  326. X# $Header: freezePch0.b,v 1.1 89/09/23 10:39:47 howard Exp $
  327. X#
  328. X# Copyright 1989 Howard Lee Gayle
  329. X# This file is written in the ISO 8859/1 character set.
  330. X# 
  331. X# This program is free software; you can redistribute it and/or modify
  332. X# it under the terms of the GNU General Public License version 1,
  333. X# as published by the Free Software Foundation.
  334. X# 
  335. X# This program is distributed in the hope that it will be useful,
  336. X# but WITHOUT ANY WARRANTY; without even the implied warranty of
  337. X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  338. X# GNU General Public License for more details.
  339. X# 
  340. X# You should have received a copy of the GNU General Public License
  341. X# along with this program; if not, write to the Free Software
  342. X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  343. X# 
  344. X# Shell variables:
  345. X# u - usage string
  346. X
  347. Xu="Usage: freezePch0 file old-revision new-revision"
  348. Xif [ $# -ne 3 ]
  349. Xthen
  350. X   echo "$u" 1>&2
  351. X   exit 1
  352. Xfi
  353. Xecho ''
  354. Xecho "patch -c $1 << 'EOF'"
  355. Xrcsdiff -c -r"$2" -r"$3" "$1" | sed -e '1,2d'
  356. Xecho EOF
  357. END_OF_FILE
  358. if test 1076 -ne `wc -c <'freezePch0.b'`; then
  359.     echo shar: \"'freezePch0.b'\" unpacked with wrong size!
  360. fi
  361. # end of 'freezePch0.b'
  362. fi
  363. if test -f 'hetero.tex' -a "${1}" != "-c" ; then 
  364.   echo shar: Will not clobber existing file \"'hetero.tex'\"
  365. else
  366. echo shar: Extracting \"'hetero.tex'\" \(31934 characters\)
  367. sed "s/^X//" >'hetero.tex' <<'END_OF_FILE'
  368. X% hetero.tex - configuration management in a heterogeous net
  369. X%
  370. X% Copyright 1989 Howard Lee Gayle
  371. X% This file is written in the ISO 8859/1 character set.
  372. X%
  373. X% $Header: hetero.tex,v 1.2 89/09/20 13:03:18 howard Exp $
  374. X%
  375. X% This program is free software; you can redistribute it and/or modify
  376. X% it under the terms of the GNU General Public License version 1,
  377. X% as published by the Free Software Foundation.
  378. X%
  379. X% This program is distributed in the hope that it will be useful,
  380. X% but WITHOUT ANY WARRANTY; without even the implied warranty of
  381. X% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  382. X% GNU General Public License for more details.
  383. X%
  384. X% You should have received a copy of the GNU General Public License
  385. X% along with this program; if not, write to the Free Software
  386. X% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  387. X\documentstyle[11pt,openbib]{report}
  388. X\input gold-lt
  389. X\input latin-lt
  390. X\input unix-lt
  391. X\global \def \today {$Revision: 1.2 $}
  392. X\raggedright
  393. X\arraycolsep 0pt
  394. X\parskip 1.5ex
  395. X\parindent 2em
  396. X\title{Sharing software in a network of heterogeneous UNIX hosts}
  397. X\author{Copyright \copyright\ 1989 Howard Lee Gayle
  398. X\thanks{
  399. XTN/ETX/T/BG,
  400. XEricsson Telecom~AB,
  401. XS-126~25 Stockholm,
  402. XSweden,
  403. Xhoward@ericsson.se,
  404. Xuunet!ericsson.se!howard,
  405. XPhone: +46~8~719~5565,
  406. XFAX: +46~8~719~9598,
  407. XTelex: 14910~ERIC~S.}}
  408. X\begin{document}
  409. X\maketitle
  410. X\begin{abstract}
  411. XMany organizations now have networks of heterogeneous
  412. XUNIX hosts,
  413. Xbut most UNIX software comes in a form
  414. Xmost suited to installing on a single, stand-alone machine.
  415. XThis report describes mechanisms and tools for managing
  416. XUNIX software in a network of heterogeneous UNIX hosts.
  417. XAll the tools are available as free software.
  418. XI address both ``making the best of'' existing software as it
  419. Xis distributed, and writing new software.
  420. X\end{abstract}
  421. X\tableofcontents
  422. X
  423. X\chapter*{License}
  424. XThis program is free software; you can redistribute it and/or modify
  425. Xit under the terms of the GNU General Public License version~1,
  426. Xas published by the Free Software Foundation.
  427. X
  428. XThis program is distributed in the hope that it will be useful,
  429. Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
  430. XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  431. XGNU General Public License for more details.
  432. X
  433. XYou should have received a copy of the GNU General Public License
  434. Xalong with this program; if not, write to the Free Software
  435. XFoundation, Inc., 675~Mass~Ave, Cambridge, MA~02139, USA.
  436. X
  437. X\chapter{Introduction}
  438. XMany organizations now have networks of heterogeneous
  439. X\UNIX\ hosts.\footnote{Operating systems other than UNIX are
  440. Xoutside the scope of this report, but I conjecture that similar
  441. Xtechniques could be used for some of them.}
  442. XBy heterogeneous, I mean the hosts have different computer
  443. Xarchitectures, run different versions of the \UNIX\ system, or
  444. Xboth.
  445. XFor example, an organization may have on its network Sun-3s
  446. Xand Sun-4s running SunOS~4.0,
  447. Xand VAXen running BSD~4.3.
  448. X
  449. XMost \UNIX\ software, as distributed, comes in a form
  450. Xmost suited to installing on a single, stand-alone machine.
  451. XThis report describes mechanisms and tools for managing
  452. X\UNIX\ software in a network of heterogeneous \UNIX\ hosts.
  453. XAll the tools are available as free software.
  454. XI address both ``making the best of'' existing software as it
  455. Xis distributed, and writing new software.
  456. XThis report is not about how to write portable software;
  457. Xit {\em is} about what to do with portable software once you
  458. Xhave it.
  459. X(For an excellent treatment of how to write portable \UNIX\
  460. Xsoftware, see
  461. X\cite{Lapin}.)
  462. X
  463. X\chapter{Notation}
  464. XIn this report, a
  465. X{\bf system type},
  466. Xor often simply
  467. X{\bf type},
  468. Xis a specific computer 
  469. Xarchitecture\footnote{Exactly what constitutes an architecture
  470. Xdepends on one's purpose.
  471. XHere I mean the architecture as seen by the compiler.
  472. XThus, for user software, a Sun~3/60 and a Sun~3/80 have the
  473. Xsame architecture.}
  474. Xrunning a specific version of \UNIX.
  475. XIn my examples I will use abbreviations for types such as
  476. Xthese:
  477. X\begin{description}
  478. X\item[sun34] A Sun-3 running SunOS~4.$x$.
  479. X\item[sun44] A Sun-4 running SunOS~4.$x$.
  480. X\item[vax43] A DEC VAX-11 running BSD~4.3.
  481. X\end{description}
  482. XThese are merely for illustration; each organization must
  483. Xchoose suitable abbreviations.
  484. X
  485. XA
  486. X{\bf software system},
  487. Xor often simply
  488. X{\bf system},
  489. Xis a set of software that is managed as a single unit,
  490. Xis installed as one package,
  491. Xand is supported by one
  492. X{\bf team}.
  493. XA system could be anything from a one-line shell file on up.
  494. XA team has one or more individual members.
  495. X
  496. XA
  497. X{\bf version}
  498. Xis one particular implementation of a system.
  499. XDifferent versions can be the result of changes over time, but
  500. Xparallel versions can also exist.
  501. XFor example, GNU Emacs has gone through versions 18.52, 18.53,
  502. X18.54,
  503. X\etcP.
  504. XAt the same time, one could have parallel versions, say for
  505. XJapanese, denoted 18.52-ja, 18.53-ja, 18.54-ja,
  506. X\etcP.
  507. X
  508. XA
  509. X{\bf virtual host}
  510. Xis an alias for some host, based on a unique service that host
  511. Xprovides.
  512. XVirtual hosts are implemented by normal host aliasing
  513. Xmechanisms,
  514. X\eg\ CNAME resource records in a domain name server.
  515. XFor example, a virtual host named ``dist'' might be used for
  516. Xmaster source distribution.
  517. X
  518. X\chapter{Goals}
  519. XMy goals are:
  520. X\begin{enumerate}
  521. X\item There should be a single master copy of the source for
  522. Xeach system.
  523. X\item It should be possible for a different team to support
  524. Xeach system.
  525. X\item The team supporting a system should have easy access to
  526. Xthe master source.
  527. X\item Subject to organizational policy and contractual obligations,
  528. Xall users
  529. Xshould have easy read-only access to the master source.
  530. X(See
  531. X\cite{Weiser:Source}
  532. Xfor an excellent discussion of how important this is.)
  533. X\item Only the team supporting a system and the superuser
  534. Xshould be able to change files associated with that system.
  535. XTeams should not be able (inadvertently) to damage files in
  536. Xsystems they do not support.
  537. X\item No version should need to be compiled more than once per
  538. Xtype.
  539. XThis means that once a version has been compiled for a type,
  540. Xall other hosts of that type should be able to share the
  541. Xbinaries.\footnote{Sharing can be by copying or by network
  542. X(\eg\ NFS) access to a single copy, or both.
  543. XEach organization must trade off disk space, execution time,
  544. Xand availability in the face of network faults.
  545. XA discussion of these tradeoffs is outside the scope of this
  546. Xreport.
  547. XThe mechanisms described in this report do not depend on any
  548. Xparticular kind of sharing.}
  549. X\item For each system, it should be easy to find out
  550. Xwhat support, if any, is provided.
  551. X\item For supported systems, it should be easy to
  552. Xcontact the support teams.
  553. X\item When feasible, it should be possible to have more than
  554. Xone version of a system installed simultaneously.
  555. XWhen a new version is installed, users should be able to
  556. Xcontinue to use an older version during a transition period.
  557. XUsers should be able to choose when to switch to a new version.
  558. X\end{enumerate}
  559. X
  560. X\chapter{Mechanisms}
  561. X\section{Master source virtual host(s)}
  562. XThe master source for each system is placed on exactly one
  563. Xvirtual host.
  564. XThe simplest scheme would be to put all systems on one virtual
  565. Xhost.
  566. X
  567. XAt Ericsson we use two virtual hosts:
  568. Xfree-dist for free software and public domain software,
  569. Xand unfree-dist for other software.
  570. XThis allows us to impose appropriate access controls to
  571. Xunfree-dist and yet give everyone easy access to free-dist.
  572. X
  573. X\section{Type virtual hosts}
  574. XEach type gets one or more virtual hosts for compiled versions
  575. Xfor that type.
  576. XAt Ericsson we use two virtual hosts per type:
  577. Xfree-{\it type\/} for free software and public domain software,
  578. Xand unfree-{\it type\/} for other software,
  579. Xwhere
  580. X{\it type\/}
  581. Xis one of the type abbreviations above.
  582. XFor example, the free-sun34 virtual host has compiled versions for
  583. XSun-3s running SunOS~4.$x$.
  584. X
  585. X\section{File system}
  586. X\subsection{Path to master source}
  587. XThe master source for each version gets its own 
  588. Xdirectory on the appropriate master source virtual
  589. Xhost.\footnote{Many of the files in a version directory
  590. Xand its subdirectories may be links to files in other versions.}
  591. XThe absolute path to any version is
  592. X{\it source-prefix\/}/{\it system\/}/{\it version},
  593. Xwhere
  594. X{\it source-prefix\/} is a fixed 
  595. Xprefix,
  596. X{\it system\/}
  597. Xis the name of the software system,
  598. Xand
  599. X{\it version\/}
  600. Xis the version identifier.
  601. X
  602. XAt Ericsson there are actually two source-prefixes:
  603. X/usr/local/free-dist and /usr/local/unfree-dist.
  604. XFor example, the master source for GNU Emacs version~18.54
  605. Xis on the free-dist virtual host in
  606. X/usr/local/free-dist/gnu-emacs/18.54.
  607. X
  608. X\subsection{Path to compiled version}
  609. XEach compiled version also gets its own directory on the
  610. Xappropriate type virtual hosts.
  611. XOn every host, the absolute path is
  612. X{\it compiled-prefix\/}/{\it system\/}/{\it version}.
  613. X
  614. XAt Ericsson,
  615. X{\it compiled-prefix\/}
  616. Xis either /usr/local/free or /usr/local/unfree.
  617. XFor example, the compiled GNU Emacs version~18.54 is in
  618. X/usr/local/free/gnu-emacs/18.54
  619. Xon
  620. X{\em every}
  621. Xhost.
  622. X
  623. X\subsection{Currently recommended version}
  624. XCompiled version~0 is an abbreviation for the currently
  625. Xrecommended version on a given host.
  626. XThis can be implemented by a symbolic link.
  627. XFor example, a new version of GNU Emacs might be installed as
  628. Xfollows.
  629. XInitially, version~0 is the same as version~18.54.
  630. XVersion~18.55 is installed, but version~0 remains the same as
  631. Xversion~18.54.
  632. XUsers who wish to do so can now test version~18.55.
  633. XAfter a testing period, version~0 is changed to be the same as
  634. Xversion~18.55.
  635. XNow most users get version~18.55 by default.
  636. XHowever, version~18.54 is still in place, and users can use it
  637. Xif they wish.
  638. XEventually it will go away, to make room for a still later
  639. Xversion.
  640. X
  641. XThe version~0 abbreviation can also be used in master source to
  642. Xindicate the currently recommended version.
  643. X
  644. X\subsection{Contents of compiled version directory}
  645. XEach compiled version directory contains a complete set of
  646. Xfiles, including a bin subdirectory for executables and a man
  647. Xsubdirectory for on-line manual entries.
  648. XThis gives system administrators complete control over which
  649. Xcompiled versions they install on the hosts they support.
  650. XIt also gives users complete control over which versions they
  651. Xuse.
  652. X
  653. X\subsection{Default version selection}
  654. XIn principle, users can choose exactly which versions to use.
  655. XHowever, used alone, this mechanism can lead to long command
  656. Xsearch paths, long MANPATH environment variable values,
  657. Xlong .login files,
  658. X\etcP.
  659. XTherefore, most sites set up local bin, man, include,
  660. X\etc\ directories,
  661. X\eg\ /usr/local/bin, /usr/local/man, and /usr/local/include.
  662. XThe system administrators for a site place in these local
  663. Xdirectories the versions they expect most users will want.
  664. XThis can be done with symbolic or hard links, or by copying.
  665. XFor example, a site could have a symbolic link from
  666. X/usr/local/bin/emacs
  667. Xto
  668. X/usr/local/free/gnu-emacs/0/bin/emacs,
  669. Xand a symbolic link from
  670. X/usr/local/man/man1/emacs.1
  671. Xto
  672. X/usr/local/free/gnu-emacs/0/man/emacs.1.
  673. XThen users who wish to use the versions selected by the system
  674. Xadministrators need only add /usr/local/bin to their command
  675. Xsearch paths and /usr/local/man to the values of their MANPATH
  676. Xenvironment variables.
  677. XTypically, the system
  678. Xadministrators would provide default shell
  679. Xinitialization files 
  680. X(\eg\ .login)
  681. Xto accomplish this.
  682. X
  683. X\section{File distribution}
  684. XMaster source files must be made available to the hosts on
  685. Xwhich they are to be compiled.
  686. XAlso, compiled versions must be made available from the type
  687. Xvirtual hosts to all other hosts of that type.
  688. XThere are essentially three mechanisms available:
  689. X\begin{enumerate}
  690. X\item local file system sharing,
  691. X\item network copying,
  692. Xand
  693. X\item distributed file systems.
  694. X\end{enumerate}
  695. X
  696. XLocal file system sharing is possible when several virtual
  697. Xhosts are implemented by one physical host.
  698. XFor example, if the physical host that implements a master source
  699. Xvirtual host is a sun44, then the same physical host can
  700. Ximplement a sun44 type virtual host.
  701. XIn addition, the compiled versions the host makes available are
  702. Xexecutable by the host's own users.
  703. X
  704. XNetwork copying uses command such as rdist or ftp to copy files
  705. Xover a network.\footnote{Copying by other means, \eg\ tape,
  706. Xcould also be used, but is outside the scope of this report.}
  707. X
  708. XDistributed file systems make files on one host appear to be in
  709. Xthe file system of another host.
  710. XExamples include Sun's Network File System (NFS) and AT\&T's
  711. XRemote File System (RFS).
  712. X
  713. XAt Ericsson all three file distribution mechanisms are used.
  714. XThe same physical host currently implements the free-dist,
  715. Xunfree-dist, free-sun34, and unfree-sun34 virtual hosts.
  716. XNFS distribution is used to other hosts with NFS.
  717. XHosts without NFS use rdist.
  718. XSites are encouraged to have local copies of executables, not
  719. Xto NFS-mount them from type virtual machines.
  720. XThe reasons for this policy are to decrease response time,
  721. Xprovide better availability, decrease net traffic, and decrease
  722. Xload on the type hosts.
  723. X
  724. XOn every host with NFS, /net/free-dist and /net/unfree-dist
  725. Xaccess the master source, and /net/free and /net/unfree access
  726. Xthe appropriate type virtual hosts.
  727. XFor example, the master source for GNU Emacs version~18.44 is
  728. Xaccessible from all hosts with NFS
  729. Xin /net/free-dist/gnu-emacs/18.44;
  730. Xthe executables for hosts of
  731. Xthat type are in
  732. X/net/free/gnu-emacs/18.44,
  733. Xand the executables for the currently recommended version are
  734. Xin
  735. X/net/free/gnu-emacs/0.
  736. XHosts running Sun's automounter system use that for /net.
  737. XOther hosts with NFS but without automounter simply NFS-mount
  738. Xon subdirectories of /net.
  739. X
  740. X\section{Permissions}
  741. XEach system can be supported by a different team.
  742. XIn fact, each each (system,~type) pair can be supported by a
  743. Xdifferent team.
  744. XTeams can be implemented by \UNIX\ groups.
  745. X
  746. XAt Ericsson we use \UNIX\ groups only to implement multi-person
  747. Xteams, since the number of different groups to which one user can
  748. Xbelong is limited on many \UNIX\ systems.
  749. XSingle-person teams are not implemented in any special way.
  750. X
  751. X\section{Obtaining information about a system}
  752. XBefore picking up a compiled version of a software system,
  753. Xsystem administrators often want information such as:
  754. X\begin{enumerate}
  755. X\item What does the software system do?
  756. X\item What kind of support is provided?
  757. X\item How does one contact the support team?
  758. X\end{enumerate}
  759. XAt Ericsson, the support team places this information in a
  760. XREADME file directly under the system directory.
  761. XFor example, on any host with NFS, a system administrator can
  762. Xget this information about GNU Emacs by reading
  763. X/net/free-dist/gnu-emacs/README.
  764. XLack of a README file indicates total lack of support.
  765. X
  766. XOnce system administrators decide to pick up a version, they
  767. Xmust still know what files to copy where.
  768. XAt Ericsson, for each type virtual host, the support team
  769. Xplaces this information in a README file directly under the
  770. Xsystem directory.
  771. XFor example, on any host with NFS, a system administrator can
  772. Xget this information about GNU Emacs by reading
  773. X/net/free/gnu-emacs/README.
  774. XWe also use the type README files to give hints to system
  775. Xadministrators about what to tell end users.
  776. XOften these hints take the form of a news article for end users
  777. Xabout what the system does, what has changed since the previous
  778. Xversion, and how to use the system.
  779. XAgain, lack of a type README file indicates total lack of
  780. Xsupport for that system on that type.
  781. X
  782. X\chapter{Installing existing single-host software}
  783. XToday, most software systems are distributed for installation on a
  784. Xsingle host.
  785. XThe systems are often portable, but their installation tools
  786. X(\eg\ makefiles), instructions, and directory layouts assume a
  787. Xmodel of installation on a single, stand-alone host.
  788. XFor example, GNU Emacs is distributed with an etc subdirectory
  789. Xcontaining both source and auxiliary files.
  790. XThe source files are only needed for compilation, but the auxiliary
  791. Xfiles must be present on every host.
  792. XBecause they are in the same directory, it is inconvenient to
  793. Xcopy only the needed 
  794. Xfiles.\footnote{Of course, all users should have
  795. X{\em access} to all GNU sources, but in many cases network
  796. Xaccess is perfectly adequate for source but not for executables.}
  797. X
  798. XThis chapter describes how to make the best of existing systems.
  799. X
  800. X\section{Master source for a new system}
  801. X\begin{enumerate}
  802. X\item Choose a software system name.
  803. XFor software distributed in moderated USENET source news groups
  804. Xsuch as comp.sources.misc, the archive name is often a good
  805. Xchoice.
  806. XIf any of the types are limited to 14~character file name
  807. Xsegments, then the system name should not exceed 14~characters.
  808. X\item This step is performed by the superuser.
  809. XFor a multi-person support team, create a corresponding
  810. X\UNIX\ group.
  811. XIt is also often convenient to create a mail alias to all
  812. Xmembers of the team, both for internal communication among team
  813. Xmembers, and to
  814. Xmake sure that all team members see problem reports.
  815. XFor example, the \TeX\ support team might have a bugs-tex mail
  816. Xalias.
  817. X\item This step is (usually) performed by the superuser.
  818. XCreate the master source top level directory.
  819. XFor a single-person team, make the owner of the directory the
  820. Xuser who will perform the support.
  821. XFor a multi-person team, make the group of the directory the
  822. Xgroup corresponding to the team, and make the directory
  823. Xgroup-writeable.
  824. XOn \UNIX\ versions that require the set-group-id bit to be set
  825. Xfor the directory in order that created files have the group of
  826. Xthe directory, set this bit.
  827. X\item Set the umask.
  828. XFor a single-person team, this would typically be~22;
  829. Xfor a multi-person team,~2.
  830. X\item Create a version directory.
  831. XIf no version is specified in the distributed software then
  832. Xversion~1 can be used.
  833. X\item If the installation requires any special actions, it is
  834. Xoften helpful to create a log file that can be used as a guide
  835. Xfor subsequent installations.
  836. XIt can be a file named ``log'' in the version directory.
  837. XI regard log files as ``revisionistic'' history:
  838. Xthey contain the commands I
  839. X{\em should}
  840. Xhave executed, not necessarily the commands I actually executed.
  841. X\item In the version directory, create a subdirectory to hold
  842. Xthe distributed source, if necessary.
  843. X(At Ericsson we use dist.)
  844. XLarger systems often already have source subdirectories.
  845. X\item Place the source in the directory.
  846. XIf necessary, uncompress compressed files, decode encoded
  847. Xfiles,
  848. X\etcP.
  849. X\item Remove write permission from all ordinary files,
  850. X\eg\ by running
  851. X\begin{verbatim}
  852. Xfind . -type f -print | xargs chmod a-w
  853. X\end{verbatim}
  854. XThis will reduce the risk of changing master source when
  855. Xediting in local changes.
  856. XIt also makes it easier to see which files have been changed locally.
  857. X\item If necessary, create a README file directly under the
  858. Xsystem directory, \eg\ /usr/local/free-dist/gnu-emacs/README.
  859. X\item If desired, set up version~0 to indicate the currently
  860. Xrecommended master source version.
  861. X\end{enumerate}
  862. X
  863. X\section{Patching a master source to a new version}
  864. XNew versions are often distributed as
  865. Xpatches\footnote{The word ``patch'' is misleading here.
  866. XThe term generally means changes made directly to object or
  867. Xmachine code, but in this case refers to source differences,
  868. Xusually the output of the diff command with the -c option for
  869. Xcontext diffs.
  870. XThese are usually installed using Larry Wall's patch program.}
  871. Xto older versions.
  872. X\begin{enumerate}
  873. X\item Set the umask.
  874. X\item Create a version directory for the new version.
  875. X\item Copy the file system hierarchy from the old version to
  876. Xthe new.
  877. XUsually, both versions will be on the same file system, so
  878. Xordinary files can be hard-linked (shallow copy).
  879. XMy lnR command can be used for this.
  880. X\item The old version may have been the result of applying
  881. Xpatches to a still older version.
  882. XIf so, the .orig and .rej files left from the previous patching
  883. Xprocess should be removed,
  884. X\eg\ by running
  885. X\begin{verbatim}
  886. Xfind . '(' -name '*.orig' -o -name '*.rej' ')' -print | xargs rm -f
  887. X\end{verbatim}
  888. X\item Apply the patches.
  889. XUsually, this is done with Larry Wall's patch program.
  890. XSince no local changes should ever be made to master source,
  891. Xall patches should succeed.
  892. X\item If desired, set up version~0 to indicate the currently
  893. Xrecommended master source version.
  894. XThis would typically be done after some testing.
  895. X\end{enumerate}
  896. X
  897. X\section{Compiling a version on a type virtual host}
  898. X\begin{enumerate}
  899. X\item This step is (usually) performed by the superuser.
  900. XCreate a top-level system directory with the appropriate
  901. Xowner, group, and mode.
  902. X\item Set the umask.
  903. X\item Copy the file system hierarchy from the master source
  904. Xversion to the version for this type.
  905. XIf hard or symbolic links can be used, my lnR command can be
  906. Xused.
  907. X\item Create a log file under the version directory to record
  908. Xdetails of the installation for future use.
  909. XIf there was already a log file in the master version, remove
  910. Xit.
  911. XIf this is not the first installation of a system, it is often
  912. Xconvenient to copy the log file from the previous installation,
  913. Xand then edit 
  914. Xit.\footnote{I find GNU Emacs shell mode very convenient for
  915. Xthis operation.
  916. X(Actually I use Olin Shiver's cmushell mode.)
  917. XI just copy commands from the edited log file window to the
  918. Xshell window and execute them.}
  919. X\item Create any subdirectories needed, \eg\ bin, man,
  920. Xman/man1, man/cat1, \etcP.
  921. X\item Make any local changes needed.
  922. XIf the files are (hard or soft) links from the master source
  923. Xdirectory, the links first need to be broken.
  924. XMy copy-self command can be used for this.
  925. XIn any case, files to be changed must be made writeable before
  926. Xthey can be edited.
  927. XFor multi-person teams, they should be made group-writeable.
  928. XThe names of all changed files should be logged.
  929. XIt may also be useful to log the changes made.
  930. X\item If a new version of a previously installed system is
  931. Xbeing installed, the local changes to
  932. Xa file are often exactly the same as when a previous version
  933. Xwas installed.
  934. XIn this case, the diff command can be used to determine what
  935. Xthe previous changes were, and the patch command can be used to
  936. Xapply them.
  937. XThe patch command automatically breaks links.
  938. X\item When the only changes to a Makefile are to variable
  939. Xdefinitions, it is often more convenient to leave the Makefile
  940. Xunchanged and instead override the definitions with command
  941. Xline arguments to make.
  942. XThe exact command should be logged for future use.
  943. X\item Perform the system-specific installation procedures.
  944. XIt is often desirable to bypass the actual installation phase
  945. X(\eg\ make install), and instead do this part by hand.
  946. X\item If necessary, create a README file directly under the
  947. Xsystem directory.
  948. X\item After testing, set up version~0.
  949. X\end{enumerate}
  950. X
  951. X\chapter{New software}
  952. XIn this chapter I describe how I write software from scratch
  953. Xfor installation in a network of heterogeneous \UNIX\ hosts.
  954. XI first try to make the software itself as portable as possible.
  955. XThen, I use the same techniques as described above for
  956. Xexisting software, but much more automated.
  957. XAlso, I try to concentrate all type-specific information into a
  958. Xsingle file.
  959. XMy approach uses GNU make, but cake could be used 
  960. Xinstead.\footnote{I chose GNU make over cake because GNU make
  961. Xhas more built-in functionality.
  962. XDoing the same things with cake would require forking child
  963. Xprocesses, and I thought that would be less efficient.
  964. XUnfortunately, GNU make has been rather buggy up to now,
  965. Xalthough version~3.54 seems {\em much} improved.
  966. XIf I were starting over, I might well choose cake instead.
  967. XI have used cake for years, and have only found two bugs during
  968. Xthat time.}
  969. X
  970. XIn essence, each version has a makefile that is identical
  971. Xacross all types.
  972. XFor development, the makefile retrieves source files from an
  973. XRCS
  974. Xsubdirectory.\footnote{SCCS could also be used.  
  975. XThis would
  976. Xrequire changing some auxiliary shell files but should not
  977. Xaffect the makefiles.
  978. XI chose RCS because I like the user interface more than SCCS,
  979. Xand because RCS is free software whereas SCCS is not.}
  980. XAt release time, files are copied to a distribution directory.
  981. XFor installation on each type, files are automatically copied
  982. Xfrom the distribution directory.
  983. XThe makefile is identical for development and installation on
  984. Xall types.
  985. XThe only differences are in a small shell file that passes
  986. Xarguments to make.
  987. X
  988. XIn the rest of this chapter I discuss my approach in detail.
  989. X
  990. X\section{Files}
  991. XThe main makefile (Makefile) contains rules for creating most targets.
  992. XIt is assisted by a micro-makefile (uMakefile)
  993. Xthat makes any files needed before make can be run using the
  994. Xmain makefile,
  995. X\eg\ the depend file that lists which C executables depend on
  996. Xwhich include files.
  997. XThe micro-makefile also makes the main makefile, if necessary.
  998. XBoth the micro-makefile and the main makefile include a few
  999. Xcommon definitions from the MakeCommon file.
  1000. XMakefile, uMakefile, and MakeCommon are stored under RCS, and are identical for
  1001. Xdevelopment and for installation on all types.
  1002. XA shell file named mk runs make twice, first using uMakefile,
  1003. Xthen Makefile.
  1004. XThere is a different mk for development and for installation on
  1005. Xeach type.
  1006. XAll type-specific information is in mk.
  1007. X
  1008. X\section{Development}
  1009. XI do development in a directory named
  1010. X{\it source-prefix\/}/{\it system\/}/{\it version}/work,
  1011. Xwith RCS files in a subdirectory named RCS.
  1012. X
  1013. XHere is the mk file I use for development for cz:
  1014. X\begin{verbatim}
  1015. XDD='../dist'
  1016. XSRCS=`cd RCS; echo * | sed -e 's;$; ;' -e 's;\.Z ; ;g' -e 's;,v ; ;g'`
  1017. XINCLUDES='-I/usr/local/local-include -I../../../howard/0'
  1018. XWORK=RCS
  1019. Xexport DD SRCS INCLUDES WORK
  1020. Xmake -f uMakefile
  1021. Xexec make -k \
  1022. X   CFLAGS='-g -Bstatic' \
  1023. X   FMTLATEX=mkLaTeXPS \
  1024. X   FMTMAN=mkManPS \
  1025. X   LIBPATHS='-L/usr/local/free-dist/howard/0/work' \
  1026. X   LL=../../../howard/0/work/llib-lhoward.ln \
  1027. X   RCID=/usr/local/free-dist/cz/2/work \
  1028. X   DEFS='-DDEBUG' \
  1029. X   $*
  1030. X\end{verbatim}
  1031. XThe first line sets the distribution directory (see below) to ../dist.
  1032. XThe second line sets the SRCS environment variable to a list of all
  1033. Xthe source files in the RCS subdirectory, with RCS's ,v
  1034. Xsuffixes stripped.
  1035. XThe RCS files may be 
  1036. Xcompressed.\footnote{If disk space gets tight, it is convenient
  1037. Xto be able to compress all the RCS files of master source that
  1038. Xhas not been accessed for a while.
  1039. XThe .DEFAULT rules in uMakefile and Makefile call the mkUncmprs
  1040. Xshell script, which uncompresses RCS files if necessary and
  1041. Xthen checks out the latest revisions.
  1042. XThe .DEFAULT feature was another reason I chose GNU make
  1043. Xinstead of cake.}
  1044. XThe third line sets the INCLUDES environment variable to
  1045. Xoverride the default value in MakeCommon.
  1046. XThe fourth line sets the WORK environment variable, indicating
  1047. Xdevelopment rather than installation.
  1048. XThese environment variables are exported, and GNU make is run
  1049. Xusing uMakefile.
  1050. XThis will update the depend file if necessary.
  1051. XThen make is run again using the main makefile.
  1052. XIt is given a number of command-line variable definitions for
  1053. Xdevelopment use,
  1054. X\eg\ the -Bstatic flag is passed to the C compiler to produce
  1055. Xstatically linked executables for easier debugging.
  1056. X
  1057. XThis approach is very dynamic: each call to mk
  1058. Xfigures out what source files are available,
  1059. Xrebuilds depend if necessary,
  1060. Xuncompresses and checks out source files and Makefile if
  1061. Xnecessary,
  1062. X\etcP.
  1063. XThe makefiles do not need to be changed when a new source file
  1064. Xis added, nor do developers ever have to remember to run a
  1065. X``make depend'' command.
  1066. X
  1067. XOf course, all this automation has its price, and on slow
  1068. Xhardware the price may be too high.
  1069. XIn that case, mk can be written
  1070. Xsimply to exec make with the appropriate arguments,
  1071. Xincluding SRCS with the names of all source files hard-coded.
  1072. XThe developers must modify mk whenever adding a new source
  1073. Xfile, and must run some other shell script to make depend when
  1074. Xnecessary.
  1075. XAutomation can be retained in the mk scripts used for
  1076. Xinstallations, since they are only executed once.
  1077. X
  1078. X\section{Capturing version information}
  1079. XA software system may consist of many master source files, but
  1080. Xit is convenient to be able to identify a version uniquely with
  1081. Xa short string, \eg\ 1.3.
  1082. XMy freeze command captures the RCS revision and date of every
  1083. Xfile in an RCS subdirectory, then places this information into
  1084. Xan RCS file named FREEZE,v.
  1085. XThe latest revision of FREEZE,v can then be used to identify a
  1086. Xversion uniquely.
  1087. XBy running freeze just before each release, developers can
  1088. Xeasily determine the RCS revision of every file in every
  1089. Xrelease, no matter how old.
  1090. X
  1091. X\section{Release numbering convention}
  1092. XAt present, I use a very simple release numbering convention.
  1093. XEach internal release is numbered by the RCS revision of the
  1094. XFREEZE,v file, \eg\ 1.1, 1.2, 1.3, \etcP.
  1095. XWhen an internal release passes its tests, it is released as an
  1096. Xexternal release.
  1097. XThe next internal release then has its first number
  1098. Xincremented.
  1099. XFor example, if 1.3 is the first internal release also to be
  1100. Xreleased externally, then the next internal release is 2.1.
  1101. XFrom an external view, only the first number is significant;
  1102. Xthe second number may be ignored.
  1103. XThe FREEZE file is distributed with each release, so the dates
  1104. Xof the release itself and of all components are easily
  1105. Xavailable.
  1106. X
  1107. XA drawback of this scheme is that there is no notation to
  1108. Xdistinguish major from minor releases.
  1109. XExternal release 3 may fix a tiny bug in external release 2, or may be a
  1110. Xtotal rewrite.
  1111. XA three-number format for internal releases would be
  1112. Xpreferable.
  1113. XThe first number would be incremented for major external
  1114. Xreleases, the second for minor external releases,
  1115. Xand the third for internal releases.
  1116. XUnfortunately, a three-number scheme is difficult to implement
  1117. Xusing RCS, so I have not (yet) done so.
  1118. X
  1119. X\section{Release mechanics}
  1120. XWhen developers are ready for an internal release, they make
  1121. Xsure all RCS files are checked in
  1122. X(\eg\ with
  1123. X\verb+rlog -L -R RCS/*,v+).
  1124. XThey run freeze to record all RCS revisions.
  1125. XThey then run mk~dist.
  1126. XThis places each release file in a distribution directory.
  1127. XThe makefile calls the mkDistO shell file for each file;
  1128. XmkDistO can be written to make a hard link, symbolic link, or
  1129. Xcopy.
  1130. XIt could also run rcp, rdist, or other 
  1131. Xcommands.\footnote{The distribution directory must appear
  1132. Xlocal, since the files in it depend on the files in the working
  1133. Xdirectory.
  1134. XThe makefile does not run mkDistO on files that have not
  1135. Xchanged.
  1136. XHard links are thus usually the best choice.}
  1137. X
  1138. X\section{Type installation}
  1139. XAfter a release, it is necessary to recompile the
  1140. Xversion on one or more types.
  1141. XOn each type, there is a directory for each version.
  1142. XInitially, it is only necessary to create this compilation
  1143. Xdirectory and any other directories needed for results,
  1144. X\eg\ bin, man, man/man1, man/cat1, \etcP.
  1145. XIn the compilation directory, three files are needed initially:
  1146. XMakeCommon, uMakefile, and mk.
  1147. XTypically, MakeCommon and uMakefile are created as symbolic
  1148. Xlinks into the distribution directory,
  1149. Xbut mk must be unique for each type, since mk contains all
  1150. Xtype-specific information.
  1151. XFor example, here is an mk shell file for a sun34 type for cz:
  1152. X\begin{verbatim}
  1153. XDD='/net/free-dist/cz/2/dist'
  1154. XSRCS=`cd $DD; echo *`
  1155. Xexport DD SRCS
  1156. Xmake -f uMakefile
  1157. Xexec make \
  1158. X   $*
  1159. X\end{verbatim}
  1160. XHere, the value of the SRCS environment variable is a list of
  1161. Xall files in the distribution directory.
  1162. XThe micro-makefile sets up the main makefile and the depend
  1163. Xfile.
  1164. XFiles are brought in from the distribution directory to the
  1165. Xcompilation directory by running mkDistI, which again can be
  1166. Xcustomized to make hard links, symbolic links, or 
  1167. Xcopies.\footnote{I use symbolic links since the distribution
  1168. Xdirectory is often on a different file system, typically
  1169. XNFS-mounted.}
  1170. X
  1171. XAfter running mk, ``mk~install'' performs the installation for the
  1172. Xtype.
  1173. XTwo shell files are used for installing a file in a directory:
  1174. XmkInstX for executable files and mkInstF for other files
  1175. X(including shell scripts).
  1176. XAgain, mkInstF and mkInstX can be customized to make hard
  1177. Xlinks, symbolic links, or copies, and to execute any other
  1178. Xcommands needed.
  1179. XFor example, mkInstX can run strip.
  1180. X
  1181. X\bibliography{b}
  1182. X\bibliographystyle{alpha}
  1183. X
  1184. X\chapter*{Colophon}
  1185. XThis report was written in \LaTeX\ version~2.09.
  1186. XIt was typeset in 11~point Computer Modern.
  1187. X
  1188. X\end{document}
  1189. END_OF_FILE
  1190. if test 31934 -ne `wc -c <'hetero.tex'`; then
  1191.     echo shar: \"'hetero.tex'\" unpacked with wrong size!
  1192. fi
  1193. # end of 'hetero.tex'
  1194. fi
  1195. echo shar: End of archive 1 \(of 9\).
  1196. cp /dev/null ark1isdone
  1197. MISSING=""
  1198. for I in 1 2 3 4 5 6 7 8 9 ; do
  1199.     if test ! -f ark${I}isdone ; then
  1200.     MISSING="${MISSING} ${I}"
  1201.     fi
  1202. done
  1203. if test "${MISSING}" = "" ; then
  1204.     echo You have unpacked all 9 archives.
  1205.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1206. else
  1207.     echo You still need to unpack the following archives:
  1208.     echo "        " ${MISSING}
  1209. fi
  1210. ##  End of shell archive.
  1211. exit 0
  1212.  
  1213.